package com.cloudkinto.common.web;

import java.io.Serializable;
import java.util.Collection;

/**
 * @author zhangyy
 * @date 2020 5-9
 */
public class ListResult<T> implements Serializable {

    private static final long serialVersionUID = -1663737152129232903L;

    /**
     * 多数据集结果
     */
    private Collection<T> data;

    /**
     * 表头信息
     */
    private Collection<T> headerInfo;

    /**
     * 无参构造函数
     */
    public ListResult() {
        super();
    }

    /**
     * 无参构造函数
     */
    public ListResult(Collection<T> values) {
        super();
        this.data = values;
    }

    public Collection<T> getData() {
        return data;
    }

    public void setData(Collection<T> data) {
        this.data = data;
    }

    public Collection<T> getHeaderInfo() {
        return headerInfo;
    }

    public void setHeaderInfo(Collection<T> headerInfo) {
        this.headerInfo = headerInfo;
    }

    @Override
    public String toString() {
        String str = super.toString();
        StringBuilder sb = new StringBuilder();
        sb.append(str).append(",");
        sb.append(data);
        return sb.toString();
    }

}
